#include<iostream>
#include<vector>
using namespace std;

int main(){
	vector <string> a;
	string s;
	while(cin>>s{
		a.push_back(s);
	}
	for(int i=a.size()-1;i>-1;i--){
		cout<<a[i]<<" ";
	}
	return 0;
} 
